import React, { Suspense } from 'react'
import { BrowserRouter, useRoutes } from 'react-router-dom'
import { routes } from './routes'

const Router: React.FC = () => {
  const RouterView = () => useRoutes(routes)
  return (
    <Suspense>
      <BrowserRouter>
        <RouterView></RouterView>
      </BrowserRouter>
    </Suspense>
  )
}


export default Router